﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GeoWeb.Demo.GeoFullTextSearch
{
    /// <summary>
    /// AutoSuggestion1 的摘要说明
    /// </summary>
    public class AutoSuggestion1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string words = context.Request.Params["queryString"];
            string backWords = "";
            if (words!=null && !words.Trim().Equals(""))
                backWords = GeoWeb.FullTextSearchLib.FullTextSearch.SearchSuggestion(words, 8);

            context.Response.ContentType = "text/plain";
            context.Response.Write(backWords);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}